<% unless cart.items.empty? %>
<div class="cart-title">你的购物车</div>
<table>
  <%= render(:partial => "cart_item",:collection => cart.items) %>
  <tr class="total-line">
    <td colspan="2">总价</td>
    <td class="total-cell"><%=number_to_currency(cart.total_price) %></td>
  </tr>
</table>
<%= button_to "结账", :action => "checkout" %>
<%= button_to "清空购物车", :action => :empty_cart %>
<%end%>